package com.zoweunion.mechanic.service.app;

import com.github.pagehelper.PageInfo;
import com.zoweunion.mechanic.model.User;
import com.zoweunion.mechanic.model.app.IntegrationExchangeRecord;
import com.zoweunion.mechanic.model.app.IntegrationGoods;
import com.zoweunion.mechanic.model.app.IntegrationRecord;
import com.zoweunion.mechanic.util.MyException;

import java.util.List;
import java.util.Map;

public interface PersonalCenterService {

    /**
     * 获取我的任务列表
     * @param currentUser
     * @param reqMap
     * @return
     */
    List<Map<String, Object>> myTaskList(User currentUser, Map<String, Object> reqMap);

    /**
     * 获取我的完成列表
     * @param currentUser
     * @param reqMap
     * @return
     */
    List<Map> myCompletedTaskList(User currentUser, Map<String, Object> reqMap);

    /**
     * 我的积分明细列表
     * @param reqMap
     * @return
     */
    List<IntegrationRecord> myIntegrationRecordList(User currentUser, Map<String, Object> reqMap);

    /**
     * 我的兑换记录列表
     * @param reqMap
     * @return
     */
    List<IntegrationExchangeRecord> myIntegrationExchangeRecord(User currentUser, Map<String, Object> reqMap);


    /**
     * 获取商品列表
     * @param reqMap
     * @return
     */
    List<IntegrationGoods> listIntegrationGoods(User currentUser, Map<String, Object> reqMap);

    /**
     * 兑换奖品
     * @param integrationExchangeRecord
     * @return
     */
    boolean exchangeGoods(User currentUser, IntegrationExchangeRecord integrationExchangeRecord) throws MyException;

    /**
     * 完成任务
     * @param reqMap
     * @return
     */
    int completeTask(User currentUser, Map<String, Object> reqMap);

    /**
     * 中奖纪录表
     * @param reqMap
     * @return
     */
    Map<String, Object> getCustomerPrizeList(Map<String, Object> reqMap, User currentUser);

    /**
     * 填写中奖信息
     * @param reqMap
     * @param currentUser
     * @return
     */
    int fillGetPrizeInfo(Map<String, Object> reqMap, User currentUser);

    /**
     * 获取访问人列表记录
     * @param currentUser
     * @param reqMap
     * @return
     */
    Map<String,Object> getVisitList(User currentUser, Map<String, Object> reqMap);

    /**
     * 获取访问人数量
     * @param currentUser
     * @param reqMap
     * @return
     */
    Map<String, Object> getVisitCount(User currentUser, Map<String, Object> reqMap);

    /**
     * 转发后推送
     * @param currentUser
     * @param reqMap
     * @return
     */
    int insertRedirect(User currentUser, Map<String, Object> reqMap);

    /**
     * 获取系统通知列表
     * @param currentUser
     * @param reqMap
     * @return
     */
    Map<String,Object> getSystemInform(User currentUser, Map<String, Object> reqMap);

    /**
     * 设置消息已读
     * @param currentUser
     * @param reqMap
     * @return
     */
    int setSystemInformReaded(User currentUser, Map<String, Object> reqMap);

    /**
     * 设置消息已读
     * @param currentUser
     * @param reqMap
     * @return
     */
    int getUnreadCount(User currentUser, Map<String, Object> reqMap);

    /**
     * 获取七日到访
     * @param currentUser
     * @param reqMap
     * @return
     */
    Map<String, Object> getWeekVistorCount(User currentUser, Map<String, Object> reqMap);
    /**
     * 访问出售，求购，出租，求租时插入记录
     * @param reqMap
     * @param currentUser
     * @param context
     * @return
     */
    int pushVisitMessage(Map<String, Object> reqMap, User currentUser, String context);

    /**
     * 获取当前用户剩余的额度和积分
     * @param currentUser
     * @return
     */
    Map<String, Object> getCurrentCreditAndIntegration(User currentUser);

    /**
     * 申请企业认证
     * @param reqMap
     * @param currentUser
     * @return
     */
    int companyApply(Map<String, Object> reqMap, User currentUser);


    /**
     * 修改企业认证申请
     * @param reqMap
     * @param currentUser
     * @return
     */
    int updateCompanyApply(Map<String, Object> reqMap, User currentUser);

    /**
     * 企业认证详情
     * @param reqMap
     * @param currentUser
     * @return
     */
    Map<String, Object> companyApplyInfo(Map<String, Object> reqMap, User currentUser);

    String addIsCompanyPublish(Map<String, Object> reqMap);

    /**
     * 车辆的数据校准
     * @param reqMap
     * @return
     */
    int carDataCalibration(Map<String, Object> reqMap);

    /**
     * 获取车辆校准数据
     * @param reqMap
     * @return
     */
    List<Map<String, Object>> getCarDataCalibration(Map<String, Object> reqMap);

    /**
     * 获取某类型的未读消息的总数
     * @param reqMap
     * @return
     */
    int getUnreadCountOfType(Map<String, Object> reqMap);

    PageInfo getMessageList(Map<String, Object> reqMap);

    PageInfo getMessageRecordList(Map<String, Object> reqMap);

    int updateMessageRecordListForIds(Map<String, Object> reqMap);

    int updateMessageRecordListForSid(Map<String, Object> reqMap);

    int updateMessageHandleStatusById(Map<String, Object> paraMap);

    int selectAllRenewalNoHandleMessageCount(Map<String, Object> paraMap);
}
